home *** CD-ROM | disk | FTP | other *** search
- OOFILE Validation Suite - Test 2
- Simple test to store some data and retrieve it
- using a relation joining over a field and showing
- iterators on related tables and 1-many relations
-
-
- table: Patients
- 447 Dent Andy 3 3 50000
- 304 DENT Trissa 2 2 99999
- 161 Smith John 1 1 20000
- 590 Taylor Ken 4 4 75000
-
-
-
- table: Visits
- 129 1 1 14/10/1994 Measles
- 349 1 1 1/10/1994 Sore Knee
- 569 2 2 23/11/1994 Flu
- 789 3 3 4/10/1994 Flu
-
-
-
- 3 Dent
- 4/10/1994 Flu
-
- 2 DENT
- 23/11/1994 Flu
-
- 1 Smith
- 14/10/1994 Measles
- 1/10/1994 Sore Knee
-
- 4 Taylor
- no visits
-
-
- Now repeating the process using a dbView instead of explicitly
- iterating over the related file.
- 3 Dent
- VisitDate Reason for Visit
-
- 4/10/1994 Flu
-
-
- 2 DENT
- VisitDate Reason for Visit
-
- 23/11/1994 Flu
-
-
- 1 Smith
- VisitDate Reason for Visit
-
- 14/10/1994 Measles
- 1/10/1994 Sore Knee
-
-
- 4 Taylor
- no visits
-
- Finding Patient No 3 : 447 Dent Andy 3 3 50000
-
- Now finding the Flu sufferers:
- 447 Dent Andy 3 3 50000
- 304 DENT Trissa 2 2 99999
-
-
- Now dumping the entire database, with patients sorted by Othernames:
-
- table: Patients
- 447 Dent Andy 3 3 50000
- 161 Smith John 1 1 20000
- 590 Taylor Ken 4 4 75000
- 304 DENT Trissa 2 2 99999
-
-
-
- table: Visits
- 129 1 1 14/10/1994 Measles
- 349 1 1 1/10/1994 Sore Knee
- 569 2 2 23/11/1994 Flu
- 789 3 3 4/10/1994 Flu
-
-
-
- Description of database schema:
- Connection: :ooftst02:
- table: Patients contains fields:
- field: Last Name type: fixed-length chars
- index: indexed, allowing dups & ignoring case
- and a maximum length of : 40
- field: Other names type: fixed-length chars
- index: indexed, allowing dups & ignoring case
- and a maximum length of : 80
- field: Visits is a 1:N relationship joining across field: PatientNo and propagating deletes to related records
- field: PatientNo type: long integer
- index: indexed, allowing dups & ignoring case
- field: Salary type: long integer
- index: indexed, allowing dups & ignoring case
-
- table: Visits contains fields:
- field: Patients is a N:1 relationship joining across field: PatientNo
- field: PatientNo type: long integer
- index: indexed, allowing dups & ignoring case
- field: VisitDate type: date
- index: indexed, allowing dups & ignoring case
- field: Reason for Visit type: fixed-length chars
- index: indexed, ignoring case, compress front & padding
- and a maximum length of : 200
-
-
- Test Completed
-